import Vue from 'vue'
import Router from 'vue-router'
import Home from './components/Home'
import Member from './components/Member'
import Shoppingcart from './components/Shoppingcart'
import Search from './components/Search'
import Newlist from './components/Newlist'
import Newinfo from './components/Newinfo'
import PhotoList from './components/photo/PhotoList.vue'
import Photoinfo from './components/photo/Photoinfo.vue'
import Goodslist from './components/Goodslist.vue'
import Imgdetails from './components/Imgdetails.vue'
import Goodinfo from './components/Goodinfo.vue'   //图文介绍
import Goodgesc from './components/Goodgesc.vue'  //商品评论
Vue.use(Router)

export default new Router({
  mode:  'history',
  base: process.env.BASE_URL,
  routes: [
  {path:'/',redirect:'/home'},
  {path:'/home',component:Home},
  {path:'/member',component:Member},
  {path:'/shoppingcart',component:Shoppingcart},
  {path:'/search',component:Search},
  {path:'/home/Newlist',component:Newlist},
  {path:'/home/Newinfo/:id',component:Newinfo},
  {path:'/home/photolist',component:PhotoList},
  {path:'/home/Photoinfo/:id',component:Photoinfo},
  {path:'/home/Goodslist',component:Goodslist},
  {path:'/home/Imgdetails/:id',component:Imgdetails},
  {path:'/home/Goodinfo/:id',component:Goodinfo,name:'Goodinfo'},
  {path:'/home/Goodgesc/:id',component:Goodgesc,name:'Goodgesc'}
  ],
  linkActiveClass:'mui-active'
})
